<template>
	<view>
		<!-- 商户详情 -->
		<MerchantPage :detailsObj='detailsObj' v-if="param.title=='商户详情'"></MerchantPage>
	</view>
</template>

<script>
	import {setNavTitle} from "@/utils/common.js"
	import MerchantPage from './MerchantPage.vue'
	import {ShopDetailsGet} from '@/config/api.js'
	export default {
		data() {
			return {
				param:{title:''},//接收参数
				detailsObj:{},//详情数据
			};
		},
		components:{
			MerchantPage
		},
		onReady(){
			setNavTitle(this.param.title)//	设置当前页面的标题
		},
		methods:{
			randerPage(){
				if(this.param.title=='商户详情'){
					this.getMerchantObj(this.param.id)
				}
			},
			async getMerchantObj(id){
				const res=ShopDetailsGet(id)
				console.log(res)
			},
		},
		onLoad(options) {
			this.param=options
			this.randerPage()//获取详情信息数据
		}
	}
</script>

<style lang="scss">

</style>
